//
//  MyRecordTableViewCell.m
//  WayToHome
//
//  Created by A-01 on 2020/6/22.
//  Copyright © 2020 A-01. All rights reserved.
//

#import "MyRecordTableViewCell.h"

@implementation MyRecordTableViewCell


- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    
    if ([super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        
        [self setupUI];
    }
    
    return self;
}


- (void)setupUI{

    self.selectionStyle = UITableViewCellSelectionStyleNone;
    self.backgroundColor = [UIColor clearColor];
    
    
    UILabel * titleLab = [UILabel new];
    
    titleLab.textColor = [UIColor colorWithHexString:@"0AB966"];
    titleLab.font = [UIFont boldSystemFontOfSize:16];
    titleLab.textAlignment = NSTextAlignmentCenter;
    
    self.titleLab = titleLab;
    
    [self.contentView addSubview:self.titleLab];
    
    
    UILabel * subLab = [UILabel new];
    
    subLab.textColor = [UIColor colorWithHexString:@"0AB966"];
    subLab.font = [UIFont boldSystemFontOfSize:16];
    subLab.textAlignment = NSTextAlignmentCenter;
    
    self.subLab = subLab;
    
    [self.contentView addSubview:self.subLab];
}


-(void)layoutSubviews{
    
    [self.titleLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.mas_equalTo(self.contentView).offset(-self.contentView.width / 4 + 10);
        make.centerY.mas_equalTo(self.contentView);
    }];
    
    [self.subLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.mas_equalTo(self.contentView).offset(self.contentView.width / 4 - 10);
        make.centerY.mas_equalTo(self.contentView);
    }];
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
